import http from '@/libs/http'
// 获取门店列表
export const businessListApi = (data) => {
	return http({
		url: `/business/list`,
		data
	})
}
// 获取门店详情
export const getOneApi = (data) => {
	return http({
		url: `/business/get_one`,
		data
	})
}
// 删除门店
export const delBusinessApi = (data) => {
  return http({
    url: `/business/business`,
    data,
		method: 'DELETE'
  })
}
// 新增门店
export const addStoreApi = (data) => {
	return http({
		url: `/business/save`,
		data,
		method: 'POST'
	})
}

// 获取产品列表
export const productListApi = (data) => {
	data.page = 1;
	data.size = 10000;
	return http({
		url: `/product/list`,
		data
	})
}
// 删除产品
export const delProApi = (data) => {
	return http({
    url: `/product/product`,
    data,
    method: 'DELETE',
  })
}
// 新增产品
export const addProApi = (data) => {
	return http({
    url: `/product/save`,
    data,
	method: 'POST'
  })
}
// 获取产品详情
export const getProDetailApi = (data) => {
	return http({
    url: `/product/get_one`,
    data
  })
}
// 获取产品枚举
export const getProEnumApi = (data) => {
	return http({
    url: `/product/enum`,
    data
  })
}
// 获取产品分账配置
export const getProDivisonApi = (data) => {
	return http({
    url: `/product/division`,
    data
  })
}
// 保存产品分账配置
export const saveProDivisonApi = (data) => {
	return http({
    url: `/product/division`,
    data,
	method: 'POST'
  })
}
// 改变门店
export const changeBusinessApi = (data) => {
	return http({
    url: `/member/change_business`,
    data,
	method: 'POST'
  })
}